<!-- 校园杂谈 -->
<div class="panel panel-success" style="margin:1% 1% 1% 1%;">
    <div class="panel-heading">
        <h3 class="panel-title">校园杂谈</h3>
    </div>

    <div class="panel-body">
        <div class="alert alert-info alert-dismissable" style="width:100%;background-color:rgba(55,224,239,0.2)">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            <?php
            if (!empty($_GET["msg"])) {
                echo '<p>' . $_GET["msg"] . '</p>';
            } else {
                echo '<p>欢迎畅所欲言</p>';
            }
            ?>
        </div>

        <div class="news-list">
            <?php
            global $m;
            $osq = $m->query("SELECT `w_user`.`name`, `content`, `time` FROM `w_xyzt_post` left join `w_user` on `uid` = `w_user`.`id`");

            while ($row = $osq->fetch_array()) {
                ?>
                <div class="ip-item ip-default-item">
                    <div class="r">
                        <p class="title">
                            <a href="#"><?php echo htmlspecialchars($row['content']); ?></a>
                        </p>
                        <div class="ip-item-info">
                            <span class="comment"><?php echo htmlspecialchars($row['name']); ?></span>
                            <div class="r">
                                <span class="date"><?php echo htmlspecialchars($row['time']); ?></span>
                            </div>
                        </div>
                    </div>
                </div>
            <?php
        }
        ?>
        </div>
    </div>
</div>

<div class="panel panel-success" style="margin:1% 1% 1% 1%;">
    <div class="panel-heading">
        <h3 class="panel-title">输入帖子内容</h3>
    </div>

    <div class="panel-body">
        <form method="post" action="index.php?mod=xyzt_post">
            <div class="form-group">
                <label for="post">文本框</label>
                <textarea class="form-control" rows="3" name="content" id="xyzt_post" required></textarea>
            </div>
            <button type="submit" class="btn btn-default">提交</button>
        </form>
    </div>
</div>